<?php
include 'init.php';
unset( $_SESSION[ 'modified' ] );

switch ( $action ) {
    case 'add':
        header( 'Location: edit.php' );
        break;
    case 'clear':
        header( 'Location: index.php' );
        break;
    default:
        $contacts = $d->get_all_contacts( );
        break;
}
include 'templates/header.template.php';
include 'templates/contacts.template.php';
include 'templates/footer.template.php';

?>
